<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //第一遍
        //数组解构
        const arr=['1','2','3'];
        let[a,b,c]=arr;
        console.log(a,b,c);
        //对象解构
        const obj={
            name:'paka',
            age:18,
            kanren:function(){
                console.log('teng');
            }
        }
        let {name,age,kanren}=obj;
        console.log(name,age,kanren);//paka 18 function
        kanren();//teng
        //第二遍
        //数组解构
        const arr=['1','2','3'];
        let[a,b,c]=arr;
        console.log(a,b,c);
        //对象解构
        const obj={
            name:'paka',
            age:18,
            kanren:function(){
                console.log('teng');
            }
        }
        let {name,age,kanren}=obj;
        console.log(name,age,kanren);
        kanren();
        //第三遍
        //数组解构
        const arr=['1','2','3'];
        let[a,b,c]=arr;
        console.log(a,b,c);
        //对象解构
        const obj={
            name:'paka',
            age:18,
            kanren:function(){
                console.log('teng');
            }
        }
        let {name,age,kanren}=obj;
        console.log(name,age,kanren);
        kanren();
    </script>
</body>
</html>